import 'package:safetymonitor/generated/json/base/json_convert_content.dart';
import 'package:safetymonitor/app/data/entities/home/enterprise/enterprise_staff_entity_entity.dart';

EnterpriseStaffEntityEntity $EnterpriseStaffEntityEntityFromJson(Map<String, dynamic> json) {
  final EnterpriseStaffEntityEntity enterpriseStaffEntityEntity = EnterpriseStaffEntityEntity();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    enterpriseStaffEntityEntity.id = id;
  }
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    enterpriseStaffEntityEntity.createTime = createTime;
  }
  final String? picture = jsonConvert.convert<String>(json['picture']);
  if (picture != null) {
    enterpriseStaffEntityEntity.picture = picture;
  }
  final int? companyId = jsonConvert.convert<int>(json['companyId']);
  if (companyId != null) {
    enterpriseStaffEntityEntity.companyId = companyId;
  }
  final String? companyName = jsonConvert.convert<String>(json['companyName']);
  if (companyName != null) {
    enterpriseStaffEntityEntity.companyName = companyName;
  }
  final int? deptId = jsonConvert.convert<int>(json['deptId']);
  if (deptId != null) {
    enterpriseStaffEntityEntity.deptId = deptId;
  }
  final String? deptName = jsonConvert.convert<String>(json['deptName']);
  if (deptName != null) {
    enterpriseStaffEntityEntity.deptName = deptName;
  }
  final int? teamId = jsonConvert.convert<int>(json['teamId']);
  if (teamId != null) {
    enterpriseStaffEntityEntity.teamId = teamId;
  }
  final String? teamName = jsonConvert.convert<String>(json['teamName']);
  if (teamName != null) {
    enterpriseStaffEntityEntity.teamName = teamName;
  }
  final String? staffName = jsonConvert.convert<String>(json['staffName']);
  if (staffName != null) {
    enterpriseStaffEntityEntity.staffName = staffName;
  }
  final int? sex = jsonConvert.convert<int>(json['sex']);
  if (sex != null) {
    enterpriseStaffEntityEntity.sex = sex;
  }
  final String? birthTime = jsonConvert.convert<String>(json['birthTime']);
  if (birthTime != null) {
    enterpriseStaffEntityEntity.birthTime = birthTime;
  }
  final String? idCard = jsonConvert.convert<String>(json['idCard']);
  if (idCard != null) {
    enterpriseStaffEntityEntity.idCard = idCard;
  }
  final String? phoneNumber = jsonConvert.convert<String>(json['phoneNumber']);
  if (phoneNumber != null) {
    enterpriseStaffEntityEntity.phoneNumber = phoneNumber;
  }
  final int? educationId = jsonConvert.convert<int>(json['educationId']);
  if (educationId != null) {
    enterpriseStaffEntityEntity.educationId = educationId;
  }
  final String? educationName = jsonConvert.convert<String>(json['educationName']);
  if (educationName != null) {
    enterpriseStaffEntityEntity.educationName = educationName;
  }
  final String? startWorkingTime = jsonConvert.convert<String>(json['startWorkingTime']);
  if (startWorkingTime != null) {
    enterpriseStaffEntityEntity.startWorkingTime = startWorkingTime;
  }
  final String? archiveNumber = jsonConvert.convert<String>(json['archiveNumber']);
  if (archiveNumber != null) {
    enterpriseStaffEntityEntity.archiveNumber = archiveNumber;
  }
  final int? jobId = jsonConvert.convert<int>(json['jobId']);
  if (jobId != null) {
    enterpriseStaffEntityEntity.jobId = jobId;
  }
  final String? jobName = jsonConvert.convert<String>(json['jobName']);
  if (jobName != null) {
    enterpriseStaffEntityEntity.jobName = jobName;
  }
  final bool? isSpecialJob = jsonConvert.convert<bool>(json['isSpecialJob']);
  if (isSpecialJob != null) {
    enterpriseStaffEntityEntity.isSpecialJob = isSpecialJob;
  }
  final bool? isSafeEducation = jsonConvert.convert<bool>(json['isSafeEducation']);
  if (isSafeEducation != null) {
    enterpriseStaffEntityEntity.isSafeEducation = isSafeEducation;
  }
  final bool? isAccident = jsonConvert.convert<bool>(json['isAccident']);
  if (isAccident != null) {
    enterpriseStaffEntityEntity.isAccident = isAccident;
  }
  final bool? isInjury = jsonConvert.convert<bool>(json['isInjury']);
  if (isInjury != null) {
    enterpriseStaffEntityEntity.isInjury = isInjury;
  }
  final bool? isHarmful = jsonConvert.convert<bool>(json['isHarmful']);
  if (isHarmful != null) {
    enterpriseStaffEntityEntity.isHarmful = isHarmful;
  }
  final String? accidentDescription = jsonConvert.convert<String>(json['accidentDescription']);
  if (accidentDescription != null) {
    enterpriseStaffEntityEntity.accidentDescription = accidentDescription;
  }
  final bool? isSpecialStaff = jsonConvert.convert<bool>(json['isSpecialStaff']);
  if (isSpecialStaff != null) {
    enterpriseStaffEntityEntity.isSpecialStaff = isSpecialStaff;
  }
  final bool? isSpecialDeviceStaff = jsonConvert.convert<bool>(json['isSpecialDeviceStaff']);
  if (isSpecialDeviceStaff != null) {
    enterpriseStaffEntityEntity.isSpecialDeviceStaff = isSpecialDeviceStaff;
  }
  final bool? isSafeEngineer = jsonConvert.convert<bool>(json['isSafeEngineer']);
  if (isSafeEngineer != null) {
    enterpriseStaffEntityEntity.isSafeEngineer = isSafeEngineer;
  }
  final List<EnterpriseStaffEntityWorkExperience>? workExperience = (json['workExperience'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<EnterpriseStaffEntityWorkExperience>(e) as EnterpriseStaffEntityWorkExperience).toList();
  if (workExperience != null) {
    enterpriseStaffEntityEntity.workExperience = workExperience;
  }
  final List<EnterpriseStaffEntityHealthConition>? healthConition = (json['healthConition'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<EnterpriseStaffEntityHealthConition>(e) as EnterpriseStaffEntityHealthConition).toList();
  if (healthConition != null) {
    enterpriseStaffEntityEntity.healthConition = healthConition;
  }
  final List<EnterpriseStaffEntityThreeViolation>? threeViolation = (json['threeViolation'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<EnterpriseStaffEntityThreeViolation>(e) as EnterpriseStaffEntityThreeViolation).toList();
  if (threeViolation != null) {
    enterpriseStaffEntityEntity.threeViolation = threeViolation;
  }
  final List<EnterpriseStaffEntityStaffEducation>? staffEducation = (json['staffEducation'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<EnterpriseStaffEntityStaffEducation>(e) as EnterpriseStaffEntityStaffEducation).toList();
  if (staffEducation != null) {
    enterpriseStaffEntityEntity.staffEducation = staffEducation;
  }
  final int? sumPeriod = jsonConvert.convert<int>(json['sumPeriod']);
  if (sumPeriod != null) {
    enterpriseStaffEntityEntity.sumPeriod = sumPeriod;
  }
  final List<EnterpriseStaffEntitySpecialDeviceStaff>? specialDeviceStaff = (json['specialDeviceStaff'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<EnterpriseStaffEntitySpecialDeviceStaff>(e) as EnterpriseStaffEntitySpecialDeviceStaff).toList();
  if (specialDeviceStaff != null) {
    enterpriseStaffEntityEntity.specialDeviceStaff = specialDeviceStaff;
  }
  final List<EnterpriseStaffEntitySafeEngineer>? safeEngineer = (json['safeEngineer'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<EnterpriseStaffEntitySafeEngineer>(e) as EnterpriseStaffEntitySafeEngineer).toList();
  if (safeEngineer != null) {
    enterpriseStaffEntityEntity.safeEngineer = safeEngineer;
  }
  final List<EnterpriseStaffEntitySpecialStaff>? specialStaff = (json['specialStaff'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<EnterpriseStaffEntitySpecialStaff>(e) as EnterpriseStaffEntitySpecialStaff).toList();
  if (specialStaff != null) {
    enterpriseStaffEntityEntity.specialStaff = specialStaff;
  }
  return enterpriseStaffEntityEntity;
}

Map<String, dynamic> $EnterpriseStaffEntityEntityToJson(EnterpriseStaffEntityEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['createTime'] = entity.createTime;
  data['picture'] = entity.picture;
  data['companyId'] = entity.companyId;
  data['companyName'] = entity.companyName;
  data['deptId'] = entity.deptId;
  data['deptName'] = entity.deptName;
  data['teamId'] = entity.teamId;
  data['teamName'] = entity.teamName;
  data['staffName'] = entity.staffName;
  data['sex'] = entity.sex;
  data['birthTime'] = entity.birthTime;
  data['idCard'] = entity.idCard;
  data['phoneNumber'] = entity.phoneNumber;
  data['educationId'] = entity.educationId;
  data['educationName'] = entity.educationName;
  data['startWorkingTime'] = entity.startWorkingTime;
  data['archiveNumber'] = entity.archiveNumber;
  data['jobId'] = entity.jobId;
  data['jobName'] = entity.jobName;
  data['isSpecialJob'] = entity.isSpecialJob;
  data['isSafeEducation'] = entity.isSafeEducation;
  data['isAccident'] = entity.isAccident;
  data['isInjury'] = entity.isInjury;
  data['isHarmful'] = entity.isHarmful;
  data['accidentDescription'] = entity.accidentDescription;
  data['isSpecialStaff'] = entity.isSpecialStaff;
  data['isSpecialDeviceStaff'] = entity.isSpecialDeviceStaff;
  data['isSafeEngineer'] = entity.isSafeEngineer;
  data['workExperience'] = entity.workExperience?.map((v) => v.toJson()).toList();
  data['healthConition'] = entity.healthConition?.map((v) => v.toJson()).toList();
  data['threeViolation'] = entity.threeViolation?.map((v) => v.toJson()).toList();
  data['staffEducation'] = entity.staffEducation?.map((v) => v.toJson()).toList();
  data['sumPeriod'] = entity.sumPeriod;
  data['specialDeviceStaff'] = entity.specialDeviceStaff?.map((v) => v.toJson()).toList();
  data['safeEngineer'] = entity.safeEngineer?.map((v) => v.toJson()).toList();
  data['specialStaff'] = entity.specialStaff?.map((v) => v.toJson()).toList();
  return data;
}

extension EnterpriseStaffEntityEntityExtension on EnterpriseStaffEntityEntity {
  EnterpriseStaffEntityEntity copyWith({
    int? id,
    String? createTime,
    String? picture,
    int? companyId,
    String? companyName,
    int? deptId,
    String? deptName,
    int? teamId,
    String? teamName,
    String? staffName,
    int? sex,
    String? birthTime,
    String? idCard,
    String? phoneNumber,
    int? educationId,
    String? educationName,
    String? startWorkingTime,
    String? archiveNumber,
    int? jobId,
    String? jobName,
    bool? isSpecialJob,
    bool? isSafeEducation,
    bool? isAccident,
    bool? isInjury,
    bool? isHarmful,
    String? accidentDescription,
    bool? isSpecialStaff,
    bool? isSpecialDeviceStaff,
    bool? isSafeEngineer,
    List<EnterpriseStaffEntityWorkExperience>? workExperience,
    List<EnterpriseStaffEntityHealthConition>? healthConition,
    List<EnterpriseStaffEntityThreeViolation>? threeViolation,
    List<EnterpriseStaffEntityStaffEducation>? staffEducation,
    int? sumPeriod,
    List<EnterpriseStaffEntitySpecialDeviceStaff>? specialDeviceStaff,
    List<EnterpriseStaffEntitySafeEngineer>? safeEngineer,
    List<EnterpriseStaffEntitySpecialStaff>? specialStaff,
  }) {
    return EnterpriseStaffEntityEntity()
      ..id = id ?? this.id
      ..createTime = createTime ?? this.createTime
      ..picture = picture ?? this.picture
      ..companyId = companyId ?? this.companyId
      ..companyName = companyName ?? this.companyName
      ..deptId = deptId ?? this.deptId
      ..deptName = deptName ?? this.deptName
      ..teamId = teamId ?? this.teamId
      ..teamName = teamName ?? this.teamName
      ..staffName = staffName ?? this.staffName
      ..sex = sex ?? this.sex
      ..birthTime = birthTime ?? this.birthTime
      ..idCard = idCard ?? this.idCard
      ..phoneNumber = phoneNumber ?? this.phoneNumber
      ..educationId = educationId ?? this.educationId
      ..educationName = educationName ?? this.educationName
      ..startWorkingTime = startWorkingTime ?? this.startWorkingTime
      ..archiveNumber = archiveNumber ?? this.archiveNumber
      ..jobId = jobId ?? this.jobId
      ..jobName = jobName ?? this.jobName
      ..isSpecialJob = isSpecialJob ?? this.isSpecialJob
      ..isSafeEducation = isSafeEducation ?? this.isSafeEducation
      ..isAccident = isAccident ?? this.isAccident
      ..isInjury = isInjury ?? this.isInjury
      ..isHarmful = isHarmful ?? this.isHarmful
      ..accidentDescription = accidentDescription ?? this.accidentDescription
      ..isSpecialStaff = isSpecialStaff ?? this.isSpecialStaff
      ..isSpecialDeviceStaff = isSpecialDeviceStaff ?? this.isSpecialDeviceStaff
      ..isSafeEngineer = isSafeEngineer ?? this.isSafeEngineer
      ..workExperience = workExperience ?? this.workExperience
      ..healthConition = healthConition ?? this.healthConition
      ..threeViolation = threeViolation ?? this.threeViolation
      ..staffEducation = staffEducation ?? this.staffEducation
      ..sumPeriod = sumPeriod ?? this.sumPeriod
      ..specialDeviceStaff = specialDeviceStaff ?? this.specialDeviceStaff
      ..safeEngineer = safeEngineer ?? this.safeEngineer
      ..specialStaff = specialStaff ?? this.specialStaff;
  }
}

EnterpriseStaffEntityWorkExperience $EnterpriseStaffEntityWorkExperienceFromJson(Map<String, dynamic> json) {
  final EnterpriseStaffEntityWorkExperience enterpriseStaffEntityWorkExperience = EnterpriseStaffEntityWorkExperience();
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    enterpriseStaffEntityWorkExperience.createTime = createTime;
  }
  final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
  if (updateTime != null) {
    enterpriseStaffEntityWorkExperience.updateTime = updateTime;
  }
  final String? creator = jsonConvert.convert<String>(json['creator']);
  if (creator != null) {
    enterpriseStaffEntityWorkExperience.creator = creator;
  }
  final String? updater = jsonConvert.convert<String>(json['updater']);
  if (updater != null) {
    enterpriseStaffEntityWorkExperience.updater = updater;
  }
  final bool? deleted = jsonConvert.convert<bool>(json['deleted']);
  if (deleted != null) {
    enterpriseStaffEntityWorkExperience.deleted = deleted;
  }
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    enterpriseStaffEntityWorkExperience.id = id;
  }
  final int? staffId = jsonConvert.convert<int>(json['staffId']);
  if (staffId != null) {
    enterpriseStaffEntityWorkExperience.staffId = staffId;
  }
  final int? jobId = jsonConvert.convert<int>(json['jobId']);
  if (jobId != null) {
    enterpriseStaffEntityWorkExperience.jobId = jobId;
  }
  final String? jobName = jsonConvert.convert<String>(json['jobName']);
  if (jobName != null) {
    enterpriseStaffEntityWorkExperience.jobName = jobName;
  }
  final String? startTime = jsonConvert.convert<String>(json['startTime']);
  if (startTime != null) {
    enterpriseStaffEntityWorkExperience.startTime = startTime;
  }
  final String? endTime = jsonConvert.convert<String>(json['endTime']);
  if (endTime != null) {
    enterpriseStaffEntityWorkExperience.endTime = endTime;
  }
  final int? mechanismId = jsonConvert.convert<int>(json['mechanismId']);
  if (mechanismId != null) {
    enterpriseStaffEntityWorkExperience.mechanismId = mechanismId;
  }
  final String? mechanismName = jsonConvert.convert<String>(json['mechanismName']);
  if (mechanismName != null) {
    enterpriseStaffEntityWorkExperience.mechanismName = mechanismName;
  }
  return enterpriseStaffEntityWorkExperience;
}

Map<String, dynamic> $EnterpriseStaffEntityWorkExperienceToJson(EnterpriseStaffEntityWorkExperience entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['createTime'] = entity.createTime;
  data['updateTime'] = entity.updateTime;
  data['creator'] = entity.creator;
  data['updater'] = entity.updater;
  data['deleted'] = entity.deleted;
  data['id'] = entity.id;
  data['staffId'] = entity.staffId;
  data['jobId'] = entity.jobId;
  data['jobName'] = entity.jobName;
  data['startTime'] = entity.startTime;
  data['endTime'] = entity.endTime;
  data['mechanismId'] = entity.mechanismId;
  data['mechanismName'] = entity.mechanismName;
  return data;
}

extension EnterpriseStaffEntityWorkExperienceExtension on EnterpriseStaffEntityWorkExperience {
  EnterpriseStaffEntityWorkExperience copyWith({
    String? createTime,
    String? updateTime,
    String? creator,
    String? updater,
    bool? deleted,
    int? id,
    int? staffId,
    int? jobId,
    String? jobName,
    String? startTime,
    String? endTime,
    int? mechanismId,
    String? mechanismName,
  }) {
    return EnterpriseStaffEntityWorkExperience()
      ..createTime = createTime ?? this.createTime
      ..updateTime = updateTime ?? this.updateTime
      ..creator = creator ?? this.creator
      ..updater = updater ?? this.updater
      ..deleted = deleted ?? this.deleted
      ..id = id ?? this.id
      ..staffId = staffId ?? this.staffId
      ..jobId = jobId ?? this.jobId
      ..jobName = jobName ?? this.jobName
      ..startTime = startTime ?? this.startTime
      ..endTime = endTime ?? this.endTime
      ..mechanismId = mechanismId ?? this.mechanismId
      ..mechanismName = mechanismName ?? this.mechanismName;
  }
}

EnterpriseStaffEntityHealthConition $EnterpriseStaffEntityHealthConitionFromJson(Map<String, dynamic> json) {
  final EnterpriseStaffEntityHealthConition enterpriseStaffEntityHealthConition = EnterpriseStaffEntityHealthConition();
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    enterpriseStaffEntityHealthConition.createTime = createTime;
  }
  final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
  if (updateTime != null) {
    enterpriseStaffEntityHealthConition.updateTime = updateTime;
  }
  final String? creator = jsonConvert.convert<String>(json['creator']);
  if (creator != null) {
    enterpriseStaffEntityHealthConition.creator = creator;
  }
  final String? updater = jsonConvert.convert<String>(json['updater']);
  if (updater != null) {
    enterpriseStaffEntityHealthConition.updater = updater;
  }
  final bool? deleted = jsonConvert.convert<bool>(json['deleted']);
  if (deleted != null) {
    enterpriseStaffEntityHealthConition.deleted = deleted;
  }
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    enterpriseStaffEntityHealthConition.id = id;
  }
  final int? staffId = jsonConvert.convert<int>(json['staffId']);
  if (staffId != null) {
    enterpriseStaffEntityHealthConition.staffId = staffId;
  }
  final String? physicalExaminationTime = jsonConvert.convert<String>(json['physicalExaminationTime']);
  if (physicalExaminationTime != null) {
    enterpriseStaffEntityHealthConition.physicalExaminationTime = physicalExaminationTime;
  }
  final bool? isPhysical = jsonConvert.convert<bool>(json['isPhysical']);
  if (isPhysical != null) {
    enterpriseStaffEntityHealthConition.isPhysical = isPhysical;
  }
  final bool? isHealth = jsonConvert.convert<bool>(json['isHealth']);
  if (isHealth != null) {
    enterpriseStaffEntityHealthConition.isHealth = isHealth;
  }
  final String? diseaseDescription = jsonConvert.convert<String>(json['diseaseDescription']);
  if (diseaseDescription != null) {
    enterpriseStaffEntityHealthConition.diseaseDescription = diseaseDescription;
  }
  final String? reason = jsonConvert.convert<String>(json['reason']);
  if (reason != null) {
    enterpriseStaffEntityHealthConition.reason = reason;
  }
  final String? bodyHealthType = jsonConvert.convert<String>(json['bodyHealthType']);
  if (bodyHealthType != null) {
    enterpriseStaffEntityHealthConition.bodyHealthType = bodyHealthType;
  }
  return enterpriseStaffEntityHealthConition;
}

Map<String, dynamic> $EnterpriseStaffEntityHealthConitionToJson(EnterpriseStaffEntityHealthConition entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['createTime'] = entity.createTime;
  data['updateTime'] = entity.updateTime;
  data['creator'] = entity.creator;
  data['updater'] = entity.updater;
  data['deleted'] = entity.deleted;
  data['id'] = entity.id;
  data['staffId'] = entity.staffId;
  data['physicalExaminationTime'] = entity.physicalExaminationTime;
  data['isPhysical'] = entity.isPhysical;
  data['isHealth'] = entity.isHealth;
  data['diseaseDescription'] = entity.diseaseDescription;
  data['reason'] = entity.reason;
  data['bodyHealthType'] = entity.bodyHealthType;
  return data;
}

extension EnterpriseStaffEntityHealthConitionExtension on EnterpriseStaffEntityHealthConition {
  EnterpriseStaffEntityHealthConition copyWith({
    String? createTime,
    String? updateTime,
    String? creator,
    String? updater,
    bool? deleted,
    int? id,
    int? staffId,
    String? physicalExaminationTime,
    bool? isPhysical,
    bool? isHealth,
    String? diseaseDescription,
    String? reason,
    String? bodyHealthType,
  }) {
    return EnterpriseStaffEntityHealthConition()
      ..createTime = createTime ?? this.createTime
      ..updateTime = updateTime ?? this.updateTime
      ..creator = creator ?? this.creator
      ..updater = updater ?? this.updater
      ..deleted = deleted ?? this.deleted
      ..id = id ?? this.id
      ..staffId = staffId ?? this.staffId
      ..physicalExaminationTime = physicalExaminationTime ?? this.physicalExaminationTime
      ..isPhysical = isPhysical ?? this.isPhysical
      ..isHealth = isHealth ?? this.isHealth
      ..diseaseDescription = diseaseDescription ?? this.diseaseDescription
      ..reason = reason ?? this.reason
      ..bodyHealthType = bodyHealthType ?? this.bodyHealthType;
  }
}

EnterpriseStaffEntityThreeViolation $EnterpriseStaffEntityThreeViolationFromJson(Map<String, dynamic> json) {
  final EnterpriseStaffEntityThreeViolation enterpriseStaffEntityThreeViolation = EnterpriseStaffEntityThreeViolation();
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    enterpriseStaffEntityThreeViolation.createTime = createTime;
  }
  final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
  if (updateTime != null) {
    enterpriseStaffEntityThreeViolation.updateTime = updateTime;
  }
  final String? creator = jsonConvert.convert<String>(json['creator']);
  if (creator != null) {
    enterpriseStaffEntityThreeViolation.creator = creator;
  }
  final String? updater = jsonConvert.convert<String>(json['updater']);
  if (updater != null) {
    enterpriseStaffEntityThreeViolation.updater = updater;
  }
  final bool? deleted = jsonConvert.convert<bool>(json['deleted']);
  if (deleted != null) {
    enterpriseStaffEntityThreeViolation.deleted = deleted;
  }
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    enterpriseStaffEntityThreeViolation.id = id;
  }
  final int? staffId = jsonConvert.convert<int>(json['staffId']);
  if (staffId != null) {
    enterpriseStaffEntityThreeViolation.staffId = staffId;
  }
  final String? viplationTime = jsonConvert.convert<String>(json['viplationTime']);
  if (viplationTime != null) {
    enterpriseStaffEntityThreeViolation.viplationTime = viplationTime;
  }
  final String? viplationType = jsonConvert.convert<String>(json['viplationType']);
  if (viplationType != null) {
    enterpriseStaffEntityThreeViolation.viplationType = viplationType;
  }
  final String? violationLaw = jsonConvert.convert<String>(json['violationLaw']);
  if (violationLaw != null) {
    enterpriseStaffEntityThreeViolation.violationLaw = violationLaw;
  }
  final String? detail = jsonConvert.convert<String>(json['detail']);
  if (detail != null) {
    enterpriseStaffEntityThreeViolation.detail = detail;
  }
  final String? rectification = jsonConvert.convert<String>(json['rectification']);
  if (rectification != null) {
    enterpriseStaffEntityThreeViolation.rectification = rectification;
  }
  return enterpriseStaffEntityThreeViolation;
}

Map<String, dynamic> $EnterpriseStaffEntityThreeViolationToJson(EnterpriseStaffEntityThreeViolation entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['createTime'] = entity.createTime;
  data['updateTime'] = entity.updateTime;
  data['creator'] = entity.creator;
  data['updater'] = entity.updater;
  data['deleted'] = entity.deleted;
  data['id'] = entity.id;
  data['staffId'] = entity.staffId;
  data['viplationTime'] = entity.viplationTime;
  data['viplationType'] = entity.viplationType;
  data['violationLaw'] = entity.violationLaw;
  data['detail'] = entity.detail;
  data['rectification'] = entity.rectification;
  return data;
}

extension EnterpriseStaffEntityThreeViolationExtension on EnterpriseStaffEntityThreeViolation {
  EnterpriseStaffEntityThreeViolation copyWith({
    String? createTime,
    String? updateTime,
    String? creator,
    String? updater,
    bool? deleted,
    int? id,
    int? staffId,
    String? viplationTime,
    String? viplationType,
    String? violationLaw,
    String? detail,
    String? rectification,
  }) {
    return EnterpriseStaffEntityThreeViolation()
      ..createTime = createTime ?? this.createTime
      ..updateTime = updateTime ?? this.updateTime
      ..creator = creator ?? this.creator
      ..updater = updater ?? this.updater
      ..deleted = deleted ?? this.deleted
      ..id = id ?? this.id
      ..staffId = staffId ?? this.staffId
      ..viplationTime = viplationTime ?? this.viplationTime
      ..viplationType = viplationType ?? this.viplationType
      ..violationLaw = violationLaw ?? this.violationLaw
      ..detail = detail ?? this.detail
      ..rectification = rectification ?? this.rectification;
  }
}

EnterpriseStaffEntityStaffEducation $EnterpriseStaffEntityStaffEducationFromJson(Map<String, dynamic> json) {
  final EnterpriseStaffEntityStaffEducation enterpriseStaffEntityStaffEducation = EnterpriseStaffEntityStaffEducation();
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    enterpriseStaffEntityStaffEducation.createTime = createTime;
  }
  final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
  if (updateTime != null) {
    enterpriseStaffEntityStaffEducation.updateTime = updateTime;
  }
  final String? creator = jsonConvert.convert<String>(json['creator']);
  if (creator != null) {
    enterpriseStaffEntityStaffEducation.creator = creator;
  }
  final String? updater = jsonConvert.convert<String>(json['updater']);
  if (updater != null) {
    enterpriseStaffEntityStaffEducation.updater = updater;
  }
  final bool? deleted = jsonConvert.convert<bool>(json['deleted']);
  if (deleted != null) {
    enterpriseStaffEntityStaffEducation.deleted = deleted;
  }
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    enterpriseStaffEntityStaffEducation.id = id;
  }
  final int? staffId = jsonConvert.convert<int>(json['staffId']);
  if (staffId != null) {
    enterpriseStaffEntityStaffEducation.staffId = staffId;
  }
  final String? educationName = jsonConvert.convert<String>(json['educationName']);
  if (educationName != null) {
    enterpriseStaffEntityStaffEducation.educationName = educationName;
  }
  final String? educationType = jsonConvert.convert<String>(json['educationType']);
  if (educationType != null) {
    enterpriseStaffEntityStaffEducation.educationType = educationType;
  }
  final String? educationLevel = jsonConvert.convert<String>(json['educationLevel']);
  if (educationLevel != null) {
    enterpriseStaffEntityStaffEducation.educationLevel = educationLevel;
  }
  final String? educationAddr = jsonConvert.convert<String>(json['educationAddr']);
  if (educationAddr != null) {
    enterpriseStaffEntityStaffEducation.educationAddr = educationAddr;
  }
  final String? startTime = jsonConvert.convert<String>(json['startTime']);
  if (startTime != null) {
    enterpriseStaffEntityStaffEducation.startTime = startTime;
  }
  final String? endTime = jsonConvert.convert<String>(json['endTime']);
  if (endTime != null) {
    enterpriseStaffEntityStaffEducation.endTime = endTime;
  }
  final int? studyHours = jsonConvert.convert<int>(json['studyHours']);
  if (studyHours != null) {
    enterpriseStaffEntityStaffEducation.studyHours = studyHours;
  }
  final int? examinationNumber = jsonConvert.convert<int>(json['examinationNumber']);
  if (examinationNumber != null) {
    enterpriseStaffEntityStaffEducation.examinationNumber = examinationNumber;
  }
  final String? staffType = jsonConvert.convert<String>(json['staffType']);
  if (staffType != null) {
    enterpriseStaffEntityStaffEducation.staffType = staffType;
  }
  final bool? isCertificate = jsonConvert.convert<bool>(json['isCertificate']);
  if (isCertificate != null) {
    enterpriseStaffEntityStaffEducation.isCertificate = isCertificate;
  }
  final bool? isAnnualTraining = jsonConvert.convert<bool>(json['isAnnualTraining']);
  if (isAnnualTraining != null) {
    enterpriseStaffEntityStaffEducation.isAnnualTraining = isAnnualTraining;
  }
  final bool? isSpecializedTraining = jsonConvert.convert<bool>(json['isSpecializedTraining']);
  if (isSpecializedTraining != null) {
    enterpriseStaffEntityStaffEducation.isSpecializedTraining = isSpecializedTraining;
  }
  final int? companyExaminationNumber = jsonConvert.convert<int>(json['companyExaminationNumber']);
  if (companyExaminationNumber != null) {
    enterpriseStaffEntityStaffEducation.companyExaminationNumber = companyExaminationNumber;
  }
  final int? smallCompanyExaminationNumber = jsonConvert.convert<int>(json['smallCompanyExaminationNumber']);
  if (smallCompanyExaminationNumber != null) {
    enterpriseStaffEntityStaffEducation.smallCompanyExaminationNumber = smallCompanyExaminationNumber;
  }
  final String? traningContent = jsonConvert.convert<String>(json['traningContent']);
  if (traningContent != null) {
    enterpriseStaffEntityStaffEducation.traningContent = traningContent;
  }
  final int? isPass = jsonConvert.convert<int>(json['isPass']);
  if (isPass != null) {
    enterpriseStaffEntityStaffEducation.isPass = isPass;
  }
  return enterpriseStaffEntityStaffEducation;
}

Map<String, dynamic> $EnterpriseStaffEntityStaffEducationToJson(EnterpriseStaffEntityStaffEducation entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['createTime'] = entity.createTime;
  data['updateTime'] = entity.updateTime;
  data['creator'] = entity.creator;
  data['updater'] = entity.updater;
  data['deleted'] = entity.deleted;
  data['id'] = entity.id;
  data['staffId'] = entity.staffId;
  data['educationName'] = entity.educationName;
  data['educationType'] = entity.educationType;
  data['educationLevel'] = entity.educationLevel;
  data['educationAddr'] = entity.educationAddr;
  data['startTime'] = entity.startTime;
  data['endTime'] = entity.endTime;
  data['studyHours'] = entity.studyHours;
  data['examinationNumber'] = entity.examinationNumber;
  data['staffType'] = entity.staffType;
  data['isCertificate'] = entity.isCertificate;
  data['isAnnualTraining'] = entity.isAnnualTraining;
  data['isSpecializedTraining'] = entity.isSpecializedTraining;
  data['companyExaminationNumber'] = entity.companyExaminationNumber;
  data['smallCompanyExaminationNumber'] = entity.smallCompanyExaminationNumber;
  data['traningContent'] = entity.traningContent;
  data['isPass'] = entity.isPass;
  return data;
}

extension EnterpriseStaffEntityStaffEducationExtension on EnterpriseStaffEntityStaffEducation {
  EnterpriseStaffEntityStaffEducation copyWith({
    String? createTime,
    String? updateTime,
    String? creator,
    String? updater,
    bool? deleted,
    int? id,
    int? staffId,
    String? educationName,
    String? educationType,
    String? educationLevel,
    String? educationAddr,
    String? startTime,
    String? endTime,
    int? studyHours,
    int? examinationNumber,
    String? staffType,
    bool? isCertificate,
    bool? isAnnualTraining,
    bool? isSpecializedTraining,
    int? companyExaminationNumber,
    int? smallCompanyExaminationNumber,
    String? traningContent,
    int? isPass,
  }) {
    return EnterpriseStaffEntityStaffEducation()
      ..createTime = createTime ?? this.createTime
      ..updateTime = updateTime ?? this.updateTime
      ..creator = creator ?? this.creator
      ..updater = updater ?? this.updater
      ..deleted = deleted ?? this.deleted
      ..id = id ?? this.id
      ..staffId = staffId ?? this.staffId
      ..educationName = educationName ?? this.educationName
      ..educationType = educationType ?? this.educationType
      ..educationLevel = educationLevel ?? this.educationLevel
      ..educationAddr = educationAddr ?? this.educationAddr
      ..startTime = startTime ?? this.startTime
      ..endTime = endTime ?? this.endTime
      ..studyHours = studyHours ?? this.studyHours
      ..examinationNumber = examinationNumber ?? this.examinationNumber
      ..staffType = staffType ?? this.staffType
      ..isCertificate = isCertificate ?? this.isCertificate
      ..isAnnualTraining = isAnnualTraining ?? this.isAnnualTraining
      ..isSpecializedTraining = isSpecializedTraining ?? this.isSpecializedTraining
      ..companyExaminationNumber = companyExaminationNumber ?? this.companyExaminationNumber
      ..smallCompanyExaminationNumber = smallCompanyExaminationNumber ?? this.smallCompanyExaminationNumber
      ..traningContent = traningContent ?? this.traningContent
      ..isPass = isPass ?? this.isPass;
  }
}

EnterpriseStaffEntitySpecialDeviceStaff $EnterpriseStaffEntitySpecialDeviceStaffFromJson(Map<String, dynamic> json) {
  final EnterpriseStaffEntitySpecialDeviceStaff enterpriseStaffEntitySpecialDeviceStaff = EnterpriseStaffEntitySpecialDeviceStaff();
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    enterpriseStaffEntitySpecialDeviceStaff.createTime = createTime;
  }
  final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
  if (updateTime != null) {
    enterpriseStaffEntitySpecialDeviceStaff.updateTime = updateTime;
  }
  final String? creator = jsonConvert.convert<String>(json['creator']);
  if (creator != null) {
    enterpriseStaffEntitySpecialDeviceStaff.creator = creator;
  }
  final String? updater = jsonConvert.convert<String>(json['updater']);
  if (updater != null) {
    enterpriseStaffEntitySpecialDeviceStaff.updater = updater;
  }
  final bool? deleted = jsonConvert.convert<bool>(json['deleted']);
  if (deleted != null) {
    enterpriseStaffEntitySpecialDeviceStaff.deleted = deleted;
  }
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    enterpriseStaffEntitySpecialDeviceStaff.id = id;
  }
  final String? workType = jsonConvert.convert<String>(json['workType']);
  if (workType != null) {
    enterpriseStaffEntitySpecialDeviceStaff.workType = workType;
  }
  final String? beginTime = jsonConvert.convert<String>(json['beginTime']);
  if (beginTime != null) {
    enterpriseStaffEntitySpecialDeviceStaff.beginTime = beginTime;
  }
  final String? endTime = jsonConvert.convert<String>(json['endTime']);
  if (endTime != null) {
    enterpriseStaffEntitySpecialDeviceStaff.endTime = endTime;
  }
  final String? certificateCode = jsonConvert.convert<String>(json['certificateCode']);
  if (certificateCode != null) {
    enterpriseStaffEntitySpecialDeviceStaff.certificateCode = certificateCode;
  }
  final String? cetificatePicture = jsonConvert.convert<String>(json['cetificatePicture']);
  if (cetificatePicture != null) {
    enterpriseStaffEntitySpecialDeviceStaff.cetificatePicture = cetificatePicture;
  }
  final int? staffId = jsonConvert.convert<int>(json['staffId']);
  if (staffId != null) {
    enterpriseStaffEntitySpecialDeviceStaff.staffId = staffId;
  }
  return enterpriseStaffEntitySpecialDeviceStaff;
}

Map<String, dynamic> $EnterpriseStaffEntitySpecialDeviceStaffToJson(EnterpriseStaffEntitySpecialDeviceStaff entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['createTime'] = entity.createTime;
  data['updateTime'] = entity.updateTime;
  data['creator'] = entity.creator;
  data['updater'] = entity.updater;
  data['deleted'] = entity.deleted;
  data['id'] = entity.id;
  data['workType'] = entity.workType;
  data['beginTime'] = entity.beginTime;
  data['endTime'] = entity.endTime;
  data['certificateCode'] = entity.certificateCode;
  data['cetificatePicture'] = entity.cetificatePicture;
  data['staffId'] = entity.staffId;
  return data;
}

extension EnterpriseStaffEntitySpecialDeviceStaffExtension on EnterpriseStaffEntitySpecialDeviceStaff {
  EnterpriseStaffEntitySpecialDeviceStaff copyWith({
    String? createTime,
    String? updateTime,
    String? creator,
    String? updater,
    bool? deleted,
    int? id,
    String? workType,
    String? beginTime,
    String? endTime,
    String? certificateCode,
    String? cetificatePicture,
    int? staffId,
  }) {
    return EnterpriseStaffEntitySpecialDeviceStaff()
      ..createTime = createTime ?? this.createTime
      ..updateTime = updateTime ?? this.updateTime
      ..creator = creator ?? this.creator
      ..updater = updater ?? this.updater
      ..deleted = deleted ?? this.deleted
      ..id = id ?? this.id
      ..workType = workType ?? this.workType
      ..beginTime = beginTime ?? this.beginTime
      ..endTime = endTime ?? this.endTime
      ..certificateCode = certificateCode ?? this.certificateCode
      ..cetificatePicture = cetificatePicture ?? this.cetificatePicture
      ..staffId = staffId ?? this.staffId;
  }
}

EnterpriseStaffEntitySafeEngineer $EnterpriseStaffEntitySafeEngineerFromJson(Map<String, dynamic> json) {
  final EnterpriseStaffEntitySafeEngineer enterpriseStaffEntitySafeEngineer = EnterpriseStaffEntitySafeEngineer();
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    enterpriseStaffEntitySafeEngineer.createTime = createTime;
  }
  final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
  if (updateTime != null) {
    enterpriseStaffEntitySafeEngineer.updateTime = updateTime;
  }
  final String? creator = jsonConvert.convert<String>(json['creator']);
  if (creator != null) {
    enterpriseStaffEntitySafeEngineer.creator = creator;
  }
  final String? updater = jsonConvert.convert<String>(json['updater']);
  if (updater != null) {
    enterpriseStaffEntitySafeEngineer.updater = updater;
  }
  final bool? deleted = jsonConvert.convert<bool>(json['deleted']);
  if (deleted != null) {
    enterpriseStaffEntitySafeEngineer.deleted = deleted;
  }
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    enterpriseStaffEntitySafeEngineer.id = id;
  }
  final String? workType = jsonConvert.convert<String>(json['workType']);
  if (workType != null) {
    enterpriseStaffEntitySafeEngineer.workType = workType;
  }
  final String? certificateTime = jsonConvert.convert<String>(json['certificateTime']);
  if (certificateTime != null) {
    enterpriseStaffEntitySafeEngineer.certificateTime = certificateTime;
  }
  final String? certificateCode = jsonConvert.convert<String>(json['certificateCode']);
  if (certificateCode != null) {
    enterpriseStaffEntitySafeEngineer.certificateCode = certificateCode;
  }
  final String? cetificatePicture = jsonConvert.convert<String>(json['cetificatePicture']);
  if (cetificatePicture != null) {
    enterpriseStaffEntitySafeEngineer.cetificatePicture = cetificatePicture;
  }
  final int? staffId = jsonConvert.convert<int>(json['staffId']);
  if (staffId != null) {
    enterpriseStaffEntitySafeEngineer.staffId = staffId;
  }
  return enterpriseStaffEntitySafeEngineer;
}

Map<String, dynamic> $EnterpriseStaffEntitySafeEngineerToJson(EnterpriseStaffEntitySafeEngineer entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['createTime'] = entity.createTime;
  data['updateTime'] = entity.updateTime;
  data['creator'] = entity.creator;
  data['updater'] = entity.updater;
  data['deleted'] = entity.deleted;
  data['id'] = entity.id;
  data['workType'] = entity.workType;
  data['certificateTime'] = entity.certificateTime;
  data['certificateCode'] = entity.certificateCode;
  data['cetificatePicture'] = entity.cetificatePicture;
  data['staffId'] = entity.staffId;
  return data;
}

extension EnterpriseStaffEntitySafeEngineerExtension on EnterpriseStaffEntitySafeEngineer {
  EnterpriseStaffEntitySafeEngineer copyWith({
    String? createTime,
    String? updateTime,
    String? creator,
    String? updater,
    bool? deleted,
    int? id,
    String? workType,
    String? certificateTime,
    String? certificateCode,
    String? cetificatePicture,
    int? staffId,
  }) {
    return EnterpriseStaffEntitySafeEngineer()
      ..createTime = createTime ?? this.createTime
      ..updateTime = updateTime ?? this.updateTime
      ..creator = creator ?? this.creator
      ..updater = updater ?? this.updater
      ..deleted = deleted ?? this.deleted
      ..id = id ?? this.id
      ..workType = workType ?? this.workType
      ..certificateTime = certificateTime ?? this.certificateTime
      ..certificateCode = certificateCode ?? this.certificateCode
      ..cetificatePicture = cetificatePicture ?? this.cetificatePicture
      ..staffId = staffId ?? this.staffId;
  }
}

EnterpriseStaffEntitySpecialStaff $EnterpriseStaffEntitySpecialStaffFromJson(Map<String, dynamic> json) {
  final EnterpriseStaffEntitySpecialStaff enterpriseStaffEntitySpecialStaff = EnterpriseStaffEntitySpecialStaff();
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    enterpriseStaffEntitySpecialStaff.createTime = createTime;
  }
  final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
  if (updateTime != null) {
    enterpriseStaffEntitySpecialStaff.updateTime = updateTime;
  }
  final String? creator = jsonConvert.convert<String>(json['creator']);
  if (creator != null) {
    enterpriseStaffEntitySpecialStaff.creator = creator;
  }
  final String? updater = jsonConvert.convert<String>(json['updater']);
  if (updater != null) {
    enterpriseStaffEntitySpecialStaff.updater = updater;
  }
  final bool? deleted = jsonConvert.convert<bool>(json['deleted']);
  if (deleted != null) {
    enterpriseStaffEntitySpecialStaff.deleted = deleted;
  }
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    enterpriseStaffEntitySpecialStaff.id = id;
  }
  final String? workType = jsonConvert.convert<String>(json['workType']);
  if (workType != null) {
    enterpriseStaffEntitySpecialStaff.workType = workType;
  }
  final String? beginTime = jsonConvert.convert<String>(json['beginTime']);
  if (beginTime != null) {
    enterpriseStaffEntitySpecialStaff.beginTime = beginTime;
  }
  final String? endTime = jsonConvert.convert<String>(json['endTime']);
  if (endTime != null) {
    enterpriseStaffEntitySpecialStaff.endTime = endTime;
  }
  final String? certificateCode = jsonConvert.convert<String>(json['certificateCode']);
  if (certificateCode != null) {
    enterpriseStaffEntitySpecialStaff.certificateCode = certificateCode;
  }
  final String? cetificatePicture = jsonConvert.convert<String>(json['cetificatePicture']);
  if (cetificatePicture != null) {
    enterpriseStaffEntitySpecialStaff.cetificatePicture = cetificatePicture;
  }
  final int? staffId = jsonConvert.convert<int>(json['staffId']);
  if (staffId != null) {
    enterpriseStaffEntitySpecialStaff.staffId = staffId;
  }
  return enterpriseStaffEntitySpecialStaff;
}

Map<String, dynamic> $EnterpriseStaffEntitySpecialStaffToJson(EnterpriseStaffEntitySpecialStaff entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['createTime'] = entity.createTime;
  data['updateTime'] = entity.updateTime;
  data['creator'] = entity.creator;
  data['updater'] = entity.updater;
  data['deleted'] = entity.deleted;
  data['id'] = entity.id;
  data['workType'] = entity.workType;
  data['beginTime'] = entity.beginTime;
  data['endTime'] = entity.endTime;
  data['certificateCode'] = entity.certificateCode;
  data['cetificatePicture'] = entity.cetificatePicture;
  data['staffId'] = entity.staffId;
  return data;
}

extension EnterpriseStaffEntitySpecialStaffExtension on EnterpriseStaffEntitySpecialStaff {
  EnterpriseStaffEntitySpecialStaff copyWith({
    String? createTime,
    String? updateTime,
    String? creator,
    String? updater,
    bool? deleted,
    int? id,
    String? workType,
    String? beginTime,
    String? endTime,
    String? certificateCode,
    String? cetificatePicture,
    int? staffId,
  }) {
    return EnterpriseStaffEntitySpecialStaff()
      ..createTime = createTime ?? this.createTime
      ..updateTime = updateTime ?? this.updateTime
      ..creator = creator ?? this.creator
      ..updater = updater ?? this.updater
      ..deleted = deleted ?? this.deleted
      ..id = id ?? this.id
      ..workType = workType ?? this.workType
      ..beginTime = beginTime ?? this.beginTime
      ..endTime = endTime ?? this.endTime
      ..certificateCode = certificateCode ?? this.certificateCode
      ..cetificatePicture = cetificatePicture ?? this.cetificatePicture
      ..staffId = staffId ?? this.staffId;
  }
}